using System.Windows;

namespace WpfApp3.Controls;


public delegate void ClosingEventHandler(object sender, ClosingEventArgs e);
public delegate void ClosedEventHandler(object sender, ClosedEventArgs e);


public class ClosingEventArgs : RoutedEventArgs
{
    public TabItem Item { get; private set; }
    public bool Cancel { get; set; }

    public ClosingEventArgs(TabItem item)
    {
        Item = item;
        Cancel = false;
        RoutedEvent = TabControl.ClosingEvent;
    }
}

public class ClosedEventArgs : RoutedEventArgs
{
    public TabItem Item { get; private set; }

    public ClosedEventArgs(TabItem item)
    {
        Item = item;
        RoutedEvent = TabControl.ClosedEvent;
    }
}
